package com.cy.detectsys.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 *
 * @TableName probe_result_connect_cloud
 */
@TableName(value ="probe_result_connect_cloud")
@Data
public class ProbeResultConnectCloud implements Serializable {
    /**
     *
     */
    private String ip;

    /**
     * 任务ID
     */
    private String taskId;

    /**
     * 所属云（政府云，公有云）
     */
    private String cloudType;

    /**
     * 云服务
     */
    private String cloudService;

    /**
     * 数据中心
     */
    private String dataCenterName;

    /**
     * 国家
     */
    private String country;

    /**
     * 可用区域
     */
    private String availableAreas;

    /**
     * 具体位置
     */
    private String location;

    /**
     * 可用于
     */
    private String useAge;

    /**
     * ipList
     */
    @TableField(exist = false)
    private String ipList;

    /**
     * 云服务总数
     */
    @TableField(exist = false)
    private String serviceNum;

    /**
     * 云服务资产数量
     */
    @TableField(exist = false)
    private String portNum;
    /**
     * 云组件资产数量
     */
    @TableField(exist = false)
    private String productPortNum;
    /**
     * 微软云数据中心云服务、云组件数量统计
     */
    @TableField(exist = false)
    private String totalPortSum;
    /**
     * 云组件名称
     */
    @TableField(exist = false)
    private String product;


    @TableField(exist = false)
    private String port;

    /**
     * 探测结果
     */
    @TableField(exist = false)
    private Integer detectionResult;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    public String getIp() {
        return ip;
    }

    /**
     *
     */
    public void setIp(String ip) {
        this.ip = ip;
    }

    /**
     * 任务ID
     */
    public String getTaskId() {
        return taskId;
    }

    /**
     * 任务ID
     */
    public void setTaskId(String taskId) {
        this.taskId = taskId;
    }

    /**
     * 所属云（政府云，公有云）
     */
    public String getCloudType() {
        return cloudType;
    }

    /**
     * 所属云（政府云，公有云）
     */
    public void setCloudType(String cloudType) {
        this.cloudType = cloudType;
    }

    /**
     * 云服务
     */
    public String getCloudService() {
        return cloudService;
    }

    /**
     * 云服务
     */
    public void setCloudService(String cloudService) {
        this.cloudService = cloudService;
    }

    /**
     * 数据中心
     */
    public String getDataCenterName() {
        return dataCenterName;
    }

    /**
     * 数据中心
     */
    public void setDataCenterName(String dataCenterName) {
        this.dataCenterName = dataCenterName;
    }

    /**
     * 国家
     */
    public String getCountry() {
        return country;
    }

    /**
     * 国家
     */
    public void setCountry(String country) {
        this.country = country;
    }

    /**
     * 可用区域
     */
    public String getAvailableAreas() {
        return availableAreas;
    }

    /**
     * 可用区域
     */
    public void setAvailableAreas(String availableAreas) {
        this.availableAreas = availableAreas;
    }

    /**
     * 具体位置
     */
    public String getLocation() {
        return location;
    }

    /**
     * 具体位置
     */
    public void setLocation(String location) {
        this.location = location;
    }

    /**
     * 可用于
     */
    public String getUseAge() {
        return useAge;
    }

    /**
     * 可用于
     */
    public void setUseAge(String useAge) {
        this.useAge = useAge;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ProbeResultConnectCloud other = (ProbeResultConnectCloud) that;
        return (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getCloudType() == null ? other.getCloudType() == null : this.getCloudType().equals(other.getCloudType()))
            && (this.getCloudService() == null ? other.getCloudService() == null : this.getCloudService().equals(other.getCloudService()))
            && (this.getDataCenterName() == null ? other.getDataCenterName() == null : this.getDataCenterName().equals(other.getDataCenterName()))
            && (this.getCountry() == null ? other.getCountry() == null : this.getCountry().equals(other.getCountry()))
            && (this.getAvailableAreas() == null ? other.getAvailableAreas() == null : this.getAvailableAreas().equals(other.getAvailableAreas()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getUseAge() == null ? other.getUseAge() == null : this.getUseAge().equals(other.getUseAge()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getCloudType() == null) ? 0 : getCloudType().hashCode());
        result = prime * result + ((getCloudService() == null) ? 0 : getCloudService().hashCode());
        result = prime * result + ((getDataCenterName() == null) ? 0 : getDataCenterName().hashCode());
        result = prime * result + ((getCountry() == null) ? 0 : getCountry().hashCode());
        result = prime * result + ((getAvailableAreas() == null) ? 0 : getAvailableAreas().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getUseAge() == null) ? 0 : getUseAge().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ip=").append(ip);
        sb.append(", taskId=").append(taskId);
        sb.append(", cloudType=").append(cloudType);
        sb.append(", cloudService=").append(cloudService);
        sb.append(", dataCenterName=").append(dataCenterName);
        sb.append(", country=").append(country);
        sb.append(", availableAreas=").append(availableAreas);
        sb.append(", location=").append(location);
        sb.append(", useAge=").append(useAge);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
